#include<stdio.h>
int main()
{
	int n = 0, i = 0, j = 0 ,k = 0, sum = 0;
	for (n = 100; n < 1000; n++)
	{
		i = n % 10;
		j = n / 10 % 10;
		k = n / 100;
		sum = i * i * i + j * j * j + k * k * k;
		if (sum == n)
		{
			printf("%d ", n);
		}
	}
	return 0;
}